from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
     url(r'^admin/', include(admin.site.urls)),
)

urlpatterns += patterns('compmanage.Computer_lab.views',
     (r'^$', 'home_page'),
     (r'^add/$', 'submit_page'),  # show submit form
     (r'^submit/$', 'submit'),  # show any result after submit computer
     (r'^submit/success$', 'success'),  # show success page after submit computer
     (r'^fix_com/$', 'fix_table'),  # show all computers to be fixed
     (r'^report/$', 'report_page'),
     ('^fix_detail/(.+)/$', 'fix_detail'),  # go to fix detail function and pass value of computer's name to parameter 
     ('^fix_submit/$', 'fix_detail_submit'),
     (r'^login/$', 'login'),
	 (r'^logout/$', 'logout'),
	 (r'^success_login/$', 'success_login'),
	 (r'^fix_submit/report.html/$', 'report_page'),
	 ('^history/$', 'draw_graph'),
)
